import { Schema, ObjectId, db } from './mongo'

const AppSchema = new Schema({
  name: { type: String, unique: true, remark: '应用名字' },
  code: { type: String, remark: '应用代码' },
  desc: { type: String, remark: '应用描述' },
  address: { type: String, remark: '应用回调地址' },
  user: { type: ObjectId, red: 'user', remark: '创建人' },
}, {
  collection: 'app',
  timestamps: true,
})

export default db.model('app', AppSchema)
